use std::fmt::Display;
use std::ops::Add;

fn main() {
    add_thing(2, 2);
    show_me("ha");
    show_me2("he");
}

// 特征区间
fn add_thing<T: Add>(fst: T, snd: T) {
    let _ = fst + snd;
}

fn show_me<T: Display>(val: T) {
    println!("{}", val);
}

// where语句
fn show_me2<T>(val: T) where T: Display {
    println!("{}", val);
}